Method: Appendable#<<

Defined in:
lib/active_form/core_extensions.rb

#<<(string_or_array) ⇒ Object



125
126
127
128
129
130
131
132
# File 'lib/active_form/core_extensions.rb', line 125

def <<(string_or_array)
  replacement = Array.new(self)
  value_to_array(string_or_array).each do |value|   
    replacement << value unless replacement.include?(value)
  end
  self.replace(replacement)
  self
end